package packag06;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Component
public class Scope {

    private String content;


    public Scope() {
        System.out.println("Scope()构造器被调用！");
    }

    public void setContent(String content) {
        this.content = content;
    }

    @PostConstruct
    public void init(){
        System.out.println("init()方法被调用l！");
    }

    @PreDestroy
    public void destroy(){
        System.out.println("destroy()方法被调用！");
    }
    public void Scope(){
        System.out.println("作用域测试！");
    }
}